home *** CD-ROM | disk | FTP | other *** search
-
- SND_LBOT = "lbot_snd_"
-
- SNDT_MOVE = "move_"
-
-
- units_sounds = {}
-
- units_sounds[SND_LBOT..SNDT_MOVE.."1"] = "smallrobot_move.wav"
- units_sounds[SND_LBOT..SNDT_MOVE.."2"] = "motor a00.wav"
- units_sounds[SND_LBOT..SNDT_MOVE.."3"] = "motor a01.wav"
- units_sounds[SND_LBOT..SNDT_MOVE.."4"] = "motor a02.wav"
- units_sounds[SND_LBOT..SNDT_MOVE.."MAX"] = 1
-
-
- function units_getRandomSoundName(unit_type,sound_type)
- local max = units_sounds[unit_type..sound_type.."MAX"]
- return units_sounds[unit_type..sound_type..math.floor(rand(1,max+1-0.01))]
- end
-